<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/dealwithfolder/DealWith.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/dealwithfolder/DealWith.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'DealWithId',
                footer: "Foots",
                cnName: '应付',
                name: 'dealwithfolder/DealWith',
                url: "/DealWith/",
                sortName: "DealWithId"
            });
            const editFormFields = ref({"DealWithId":"","DealWithName":"","Ordertype":"","EndOrderTime":"","Payer":"","Payee":"","DealWithPrice":"","Remark":""});
            const editFormOptions = ref([[{"title":"流水号","required":true,"field":"DealWithId","disabled":true,"type":"text"},
                               {"title":"产品名称","field":"DealWithName","type":"text"}],
                              [{"dataKey":"FinancialCategoryId ","data":[],"title":"付款方式","field":"Ordertype","type":"select"},
                               {"title":"最后付款日","field":"EndOrderTime","type":"datetime"}],
                              [{"title":"付款人","field":"Payer","type":"text"},
                               {"title":"收款人","field":"Payee","type":"text"}],
                              [{"title":"应付金额","field":"DealWithPrice","type":"text"}],
                              [{"title":"备注","field":"Remark","type":"textarea"}]]);
            const searchFormFields = ref({"DealWithId":"","DealWithName":"","Ordertype":"","Payee":"","PayReceState":"","CreateTime":""});
            const searchFormOptions = ref([[{"title":"流水号","field":"DealWithId"},{"title":"产品名称","field":"DealWithName"},{"dataKey":"FinancialCategoryId ","data":[],"title":"付款方式","field":"Ordertype","type":"select"}],[{"title":"收款人","field":"Payee"},{"dataKey":"应收状态","data":[],"title":"状态","field":"PayReceState","type":"select"},{"title":"起始时间","field":"CreateTime","type":"datetime"}]]);
            const columns = ref([{field:'DealWithId',title:'流水号',type:'string',width:220,readonly:true,require:true,align:'left',sort:true},
                       {field:'DealWithName',title:'产品名称',type:'string',width:220,align:'left'},
                       {field:'Ordertype',title:'付款方式',type:'string',bind:{ key:'FinancialCategoryId ',data:[]},width:220,align:'left'},
                       {field:'Payer',title:'付款人',type:'string',width:110,align:'left'},
                       {field:'Payee',title:'收款人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'DealWithPrice',title:'应付金额',type:'decimal',width:110,align:'left'},
                       {field:'ActualPrice',title:'实付金额',type:'decimal',width:110,align:'left'},
                       {field:'ResiduePrice',title:'剩余金额',type:'decimal',width:110,align:'left'},
                       {field:'EndOrderTime',title:'最后付款日',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Remark',title:'备注',type:'string',width:180,hidden:true,align:'left'},
                       {field:'PayReceState',title:'状态',type:'int',bind:{ key:'应收状态',data:[]},width:110,require:true,align:'left'},
                       {field:'CreateTime',title:'起始时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'IsDeleted',title:'是否删除',type:'sbyte',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
